
from a import CLanguage



#下面定义了一个实例方法
def info(self):
    print("正在调用实例方法")

#下面定义了一个类方法
@classmethod
def info2(cls):
    print("正在调用类方法")

#下面定义个静态方法
@staticmethod
def info3():
    print("正在调用静态方法")


def say(self):
    print('动态添加示例方法say')

CLanguage.info = info
CLanguage.info2 = info2
CLanguage.info3 = info3

CLanguage.say = say


lg1 = CLanguage()

lg1.info()
CLanguage.info2()
CLanguage.info3()
lg1.say()

# Traceback (most recent call last):
#   File "E:/learn_language/python/Python语法/Main.py", line 31, in <module>
#     lg1 = CLanguage()
# TypeError: 'module' object is not callable
